package pl.krzosekm.vehicleregister.model;

import java.io.Serializable;

import javax.persistence.MappedSuperclass;
import javax.persistence.Table;


@MappedSuperclass
@Table(catalog="vehicle_register")
public abstract class PersistentObject implements Serializable {

    private static final long serialVersionUID = -6546090995642789473L;
    
    
//    @Version
//    @Column(name= "row_version", nullable=false)
//    private Integer rowVersion;

    

//    public abstract Integer getId();
//
//    public abstract void setId(Integer id);

    /**
     * For proper user equals method it should be implemented in subclasses
     * After generating equals method REMEBER to delete part "if (!super.equals(obj))"
     * and REMEBER to add "if (obj == null)
						   return false;"
     * @param obj
     * @return
     */
    
    public boolean equals(Object obj) {
    	throw new IllegalStateException("Not implemented equals() method in "+ obj.getClass().getSimpleName() + " class");
    }

//    public Integer getRowVersion() {
//        return rowVersion;
//    }
//
//    public void setRowVersion(Integer rowVersion) {
//        this.rowVersion = rowVersion;
//    }
}
